package com.qiqv.controller;

import com.qiqv.Application;
import com.qiqv.dto.QiQvResult;
import com.qiqv.dto.instrument.Piano;
import com.qiqv.exception.ApplicationException;
import com.qiqv.service.InstrumentService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author hjr
 * @version 1.0
 * @date 2023/2/14 14:46
 */
@RestController
@RequestMapping("instrument")
public class InstrumentController {
    
    @Resource
    private InstrumentService instrumentService;

    /**
     * 获取（88键）钢琴的音频文件
     * @return
     */
    @RequestMapping("getPianoAudios")
    public QiQvResult getPianoAudios(){
        Piano piano = instrumentService.getPianoAudios();
        return QiQvResult.OK(piano);
    }
}
